Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Fix message when maxSaleQty is set and qty is more than maxSaleQty #367

Merged
merged 12 commits into from
Mar 6, 2019

Conversation

XxXgeoXxX
Copy link
Member

Original Isuue #354

Description (*)

When maxSaleQty is set and qty is more than maxSaleQty the "The most you may purchase is %1." message should be sent instead of "Internal server error"
Test Execution
Scenario: https://app.hiptest.com/projects/114163/test-plan/folders/801154/scenarios/2692157

Preconditions (*)

  1. Simple Product is created

Manual testing scenarios (*)

Steps to reproduce (*)

  1. Go to Stores->Configuration->Catalog->Inventory
  2. Open tab "Product Stock Options"
  3. Change "Manage Stock" to "Yes"
  4. Change "Maximum Qty Allowed in Shopping Cart" to 3
  5. Click button "Save config"
  6. Go to Store -> Cache Management
  7. Click button Flush Magento Cache
  8. Create empty cart with GraphQL (or just remove all the products from shopping cart)
  9. Perform query

mutation {
addSimpleProductsToCart(
input: {
cart_id: "{{ CART_ID }}",
cartItems: [
{
data: {
sku: "simple-1",
qty: 4
},
}
]
}
) {
cart {
items {
id
qty
product {
sku
name
}
}
}
}
}

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@naydav
Copy link
Contributor

naydav commented Feb 14, 2019

@XxXgeoXxX
Copy link
Member Author

Hi @naydav
Could you review?

@magento-engcom-team magento-engcom-team merged commit 1b5991d into magento:2.3-develop Mar 6, 2019
@ghost
Copy link

ghost commented Mar 6, 2019

Hi @XxXgeoXxX, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants